home *** CD-ROM | disk | FTP | other *** search
/ Computer Shopper 235 / Issue 235 - September 2007 - DPCS0907DVD.ISO / Extras / NetObjects Fusion / NOF10.exe / data1.cab / FSI / lib / nof / util / logging / Level.js < prev    next >
Encoding:
Text File  |  2007-04-11  |  1.9 KB  |  72 lines

  1. /****i* SOURCE_FILE/INFO
  2.   *
  3.   * NAME
  4.   *  Level.js
  5.   *
  6.   * USAGE
  7.   *  Part of Netobjects JavaScript Library.
  8.   *
  9.   * COPYRIGHT
  10.   *  Copyright ⌐ 2000-2005 Website Pros, Inc.
  11.   *  All Rights Reserved.
  12.   *
  13.   *  This is an unpublished work protected by Website Pros, Inc.
  14.   *  as a trade secret, and is not to be used or disclosed except as
  15.   *  expressly provided in a written license agreement executed by
  16.   *  you and Website Pros, Inc.
  17.   *
  18.   *      <copyright@websitepros.com>
  19.   *
  20.   * NOTES
  21.   *  JavaScript code.
  22.   *
  23.   *****/
  24.  
  25. if (!IS_isModuleInitialized("IS.NOF.UTIL.LOGGING.Level"))
  26. {   
  27.   /****h* NOF_JavaScript_Library/NOF.UTIL.LOGGING.Level
  28.     *
  29.     * NAME
  30.     *  NOF.UTIL.LOGGING.Level
  31.     *
  32.     * DESCRIPTION
  33.     *  
  34.     * Level is a class (actually, an interface) which specifies the possible log levels
  35.     * for a fine-grained control of the LOGGING mechanism. 
  36.     * The levels in descending order are:
  37.     * <ul>
  38.     * <li>SEVERE
  39.     * <li>WARNING
  40.     * <li>INFO
  41.     * <li>CONFIG
  42.     * <li>FINE
  43.     * <li>FINER
  44.     * <li>FINEST
  45.     * </ul>
  46.     * They are represented internal as integers and can be denominated through Level.LEVEL_NAMES list, i.e.
  47.     * LOGGING.Level.LEVEL_NAMES[LOGGING.Level.INFO] will have the value of "INFO".
  48.     * Enabling LOGGING at a given level also enables LOGGING at all higher levels. 
  49.     *
  50.     ****/
  51.   
  52.   /**
  53.   * constructor 
  54.   **/   
  55.   function LOGGING_Level( ) {
  56.     this.__proto__ = LOGGING_Level.prototype;                                            
  57.   }
  58.   {
  59.     var member = LOGGING_Level.prototype;    
  60.     member.CLASS_NAME        = "LOGGING.Level";
  61.     
  62.     member.SEVERE      = 0; //(highest value) 
  63.     member.WARNING    = 1;
  64.     member.INFO          = 2;
  65.     member.CONFIG     = 3;
  66.     member.FINE       = 4;        
  67.     member.FINER       = 5;
  68.     member.FINEST      = 6;    
  69.     member.LEVEL_NAMES = ["SEVERE", "WARNING", "INFO", "CONFIG", "FINE", "FINER", "FINEST"];    
  70.   }
  71.   LOGGING.__proto__.Level = new LOGGING_Level();
  72. }